package com.mcr.reggie.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.io.File;

@Configuration
@Component
public class DelImage {
    @Value("${reggie.path}")
    private String BasePath;//自定义路径类
    public void delImage(String imgName){
        String imgPath=BasePath+imgName;
        File file=new File(imgPath);
        file.delete();
    }
}
